home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 3.5 KB | 108 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWSclNot.cpp
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #include "FWFrameW.hpp"
-
- #ifndef FWSCLNOT_H
- #include "FWSclNot.h"
- #endif
-
- #ifndef FWSCLBAR_H
- #include "FWSclBar.h"
- #endif
-
- //========================================================================================
- // Runtime Info
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- #pragma segment FW_FrameSegment
- #endif
-
- //========================================================================================
- // CLASS FW_CScrollNotification
- //========================================================================================
-
- FW_DEFINE_CLASS_M1(FW_CScrollNotification, FW_CControlNotification)
-
- //----------------------------------------------------------------------------------------
- // FW_CScrollNotification::FW_CScrollNotification
- //----------------------------------------------------------------------------------------
-
- FW_CScrollNotification::FW_CScrollNotification(FW_CScrollBar* sb,
- FW_XYSelector direction,
- FW_Fixed delta,
- FW_Boolean shouldScroll) :
- FW_CControlNotification(sb, FW_kScrollMsg),
- fDirection(direction),
- fDelta(delta),
- fShouldScroll(shouldScroll)
- {
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CScrollNotification::FW_CScrollNotification
- //----------------------------------------------------------------------------------------
-
- FW_CScrollNotification::FW_CScrollNotification(const FW_CScrollNotification& other) :
- FW_CControlNotification(other),
- fDirection(other.fDirection),
- fDelta(other.fDelta),
- fShouldScroll(other.fShouldScroll)
- {
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CScrollNotification::~FW_CScrollNotification
- //----------------------------------------------------------------------------------------
-
- FW_CScrollNotification::~FW_CScrollNotification()
- {
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CScrollNotification::operator==
- //----------------------------------------------------------------------------------------
-
- FW_Boolean FW_CScrollNotification::operator==(const FW_CScrollNotification& other) const
- {
- return FW_CControlNotification::operator==(other) &&
- fDirection == other.fDirection &&
- fDelta == other.fDelta &&
- fShouldScroll == other.fShouldScroll;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CScrollNotification::operator=
- //----------------------------------------------------------------------------------------
-
- FW_CScrollNotification& FW_CScrollNotification::operator=(const FW_CScrollNotification& other)
- {
- if (this != &other)
- {
- FW_CControlNotification::operator=(other);
- fDirection = other.fDirection;
- fDelta = other.fDelta;
- fShouldScroll = other.fShouldScroll;
- }
- return *this;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CScrollNotification::GetScrollPos
- //----------------------------------------------------------------------------------------
-
- FW_Fixed FW_CScrollNotification::GetScrollPos(Environment* ev) const
- {
- FW_CScrollBar* sb = (FW_CScrollBar*)GetControl(ev);
- return sb->GetScrollPos(ev);
- }
-
-
-